﻿using EFramework.DataAccess.Entity;
using System;
using System.Text;

namespace EFramework.DataAccess.Utils
{
    class Base
    {/// <summary>
        /// 生成异常信息
        /// </summary>
        /// <param name="ex"></param>
        /// <returns></returns>
        public static string BuilderSqlError(EConnection conn, Exception ex)
        {
            StringBuilder sbrError = new StringBuilder();
            sbrError.AppendLine(ex.Message);
            //sbrError.AppendLine(this.__Conn.ConnectionString);
            sbrError.AppendLine(conn.SqlScript);
            return sbrError.ToString();
        }
    }
}
